package com.int_tech.car.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by Administrator on 2017/9/22.
 * @author dmy
 * 车辆信息
 */
@Entity
@Table(name = "c_car")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@Accessors(chain = true)
public class Car {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(length = 8)
    private Integer id;

    //车牌号
    @Column(length = 64)
    private String carNumber;

    //车厢长
    @Column(length = 64)
    private String length;

    //车厢宽
    @Column(length = 64)
    private String width;

    //车厢高
    @Column(length = 64)
    private String height;

    //载重
    @Column(length = 64)
    private String loud;

    //车辆品牌，
    @Column(length = 64)
    private String carBrand;

    //1,删除，，0，正常
    @Column(length = 2)
    private int isDel;

    //创建时间
    @Temporal(TemporalType.TIMESTAMP)
    @Column(updatable = false)
    private Date createTime;

    //修改时间
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateTime;

    //场站id
    @Column(length =8)
    private int stationId;

    //场站名
    @Column(length = 64)
    private String stationName;

    //客户id
    @Column(length = 8)
    private int clientId;

    @Column(length = 64)
    private String model;

    @Column(length = 64)
    private String carCnumber;
}
